package com.fkdx.datasource;

/**
 * 动态数据源Holder
 */
class DynamicDataSourceHolder {

    private static final ThreadLocal<String> THREAD_LOCAL = new ThreadLocal<>();

    static void putDataSource(String name) {
        THREAD_LOCAL.set(name);
    }

    static String getDataSource() {
        return THREAD_LOCAL.get();
    }

    static void removeDataSource() {
        THREAD_LOCAL.remove();
    }

}
